<?php

/**
 * docente actions.
 *
 * @package    sayd
 * @subpackage docente
 * @author     hylianred
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class docenteActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request){
    if (!$this->getUser()->isAuthenticated()){
        $this->forward404();
    }else{
        $this->setLayout('layout');
    }
  }
  
  public function executeLogout(sfWebRequest $request){
    if (!$this->getUser()->isAuthenticated()){
        $this->forward404();
    }else{
        $this->getUser()->setAuthenticated(false);
        $this->getUser()->getAttributeHolder()->clear();
        $this->redirect("@homepage");
    }
  }
}
